﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp12
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入1：圆形，2：正方形");
            int a = int.Parse(Console.ReadLine());
            Console.WriteLine("输入图形颜色");
            string c2 = Console.ReadLine();
            Square s1 = new Square();
            s1.color = c2;
            Circle c1 = new Circle();
            c1.color = c2;
            switch (a)
            {
                case 1:
                    Circle c = new Circle();
                    Console.WriteLine("请输入圆的半径");
                    double radius = double.Parse(Console.ReadLine());
                    c.radius = radius;
                    c.GetArea();
                    break;
                case 2:
                    Square s = new Square();
                    Console.WriteLine("请输入边长");
                    int sideLen = int.Parse(Console.ReadLine());
                    s.sideLen = sideLen;
                    s.GetArea();
                    break;
                default:
                    Console.WriteLine("输入错误");
                    break;


            }



        }
    
    }
}
